class Triangle {
	private double a;
	private double b;
	private double c;

	public Triangle(double a, double b, double c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	public double getArea() {
		double p = getPerimeter() / 2;
		double area = Math.sqrt(p*(p-a)*(p-b)*(p-c));
		return area;
	}

	public double getPerimeter() {
		return a + b + c;
	}

	public static void main(String[] args) {
		Triangle t1 = new Triangle(3, 4, 5);
		System.out.println(t1.getArea());
		System.out.println(t1.getPerimeter());

		Triangle t2 = new Triangle(7, 8, 9);
		System.out.println(t2.getArea());
		System.out.println(t2.getPerimeter());
		
		
	}
}
